Carbon


DMCheckDisplayMode

Header: Displays.h Carbon status: Supported

Determines if a video device supports a particular display mode and pixel depth.

OSErr DMCheckDisplayMode (
    GDHandle theDevice, 
    UInt32 mode, 
    UInt32 depthMode, 
    UInt32 *switchFlags, 
    UInt32 reserved, 
    Boolean *modeOk
);
Parameter descriptions
theDevice

A handle to the GDevice structure for the video device whose display mode and pixel depth you wish to check.

mode

The display mode you wish to check. You get a list of display modes by calling DMGetDisplayMode.

depthMode

The pixel depth you wish to check. See “Video Depth Mode Values” for list of possible values.

switchFlags

On return, a pointer to a long integer that indicates if a video device will support the mode specified by the mode parameter and the pixel depth specified by the depthMode parameter. See “Switch Flags” for a description.

reserved

Reserved for future expansion. Pass NULL in this parameter.

modeOk

On return, a pointer to a Boolean. If modeOk points to a value of true, the user or your application can switch the display mode for the video device to the one specified by mode.

function result

A result code.

DISCUSSION

Usually, your application only needs to know if a video device supports a specific pixel depth. Thus your application can use the Color QuickDraw function HasDepth. The function DMCheckDisplayMode is essentially obsolete, and is here for completeness.

SPECIAL CONSIDERATIONS

Because this function may move or purge memory blocks or access handles, you cannot call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)